package com.docmgmt.mvp.dto;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.util.List;

/**
 * 更新用户请求
 */
@Data
public class UpdateUserRequest {

    /**
     * 邮箱
     */
    @Email(message = "邮箱格式不正确")
    private String email;

    /**
     * 全名
     */
    @Size(max = 50, message = "全名最多50字符")
    private String fullName;

    /**
     * 手机号
     */
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    /**
     * 头像URL
     */
    private String avatarUrl;

    /**
     * 部门ID
     */
    private Long departmentId;

    /**
     * 用户状态（active/inactive/locked）
     */
    @Pattern(regexp = "^(active|inactive|locked)$", message = "状态必须为 active、inactive 或 locked")
    private String status;

    /**
     * 存储配额（字节）
     */
    @Min(value = 0, message = "存储配额不能为负数")
    private Long storageQuota;

    /**
     * 角色列表（v3.0 RBAC）
     */
    private List<String> roles;
    
    // ==================== Getter 方法（为编译添加）====================
    
    public String getEmail() {
        return this.email;
    }
    
    public String getFullName() {
        return this.fullName;
    }
    
    public String getPhone() {
        return this.phone;
    }
    
    public String getAvatarUrl() {
        return this.avatarUrl;
    }
    
    public Long getDepartmentId() {
        return this.departmentId;
    }
    
    public String getStatus() {
        return this.status;
    }
    
    public Long getStorageQuota() {
        return this.storageQuota;
    }
    
    public List<String> getRoles() {
        return this.roles;
    }
}